Xbasic

FILE.FROM_PROPERTY Function

Syntax

Byte_Count as N = FILE.From_Property(C Filename,P data)

Arguments

FilenameCharacter

The path and name of the file to create.

dataPointer

A pointer variable containing the data to write.

Returns

Byte_CountNumeric

Returns the size of the file.

Description

Writes pointer contents to a file.

Discussion

The FILE.FROM_PROPERTY() method creates a property file from a dot variable.

Example

dim a[1] as P
a[1].name = "Fred"
a[1].city = "Boston"
a[1].age = 23

i = a.append()
a[i].name = "Tom"
a[i].city = "NY"
a[i].age = 35
FILE.From_property("c:\my_property.txt", a)

The contents of the resulting file look like this:

<[1]<name="Fred">
<city="Boston">
<age=23>
>
<[2]<name="Tom">
<city="NY">
<age=35>
>

See Also